3.6.34 \(\int \frac {(a+b \log (c (d (e+f x)^p)^q))^2}{(g+h x) (i+j x)^2} \, dx\) [534]

3.6.34.1 Optimal result
3.6.34.2 Mathematica [A] (verified)
3.6.34.3 Rubi [A] (verified)
3.6.34.4 Maple [F]
3.6.34.5 Fricas [F]
3.6.34.6 Sympy [F]
3.6.34.7 Maxima [F]
3.6.34.8 Giac [F]
3.6.34.9 Mupad [F(-1)]

3.6.34.1 Optimal result

Integrand size = 35, antiderivative size = 463 \[ \int \frac {\left (a+b \log \left (c \left (d (e+f x)^p\right )^q\right )\right )^2}{(g+h x) (i+j x)^2} \, dx=-\frac {j (e+f x) \left (a+b \log \left (c \left (d (e+f x)^p\right )^q\right )\right )^2}{(f i-e j) (h i-g j) (i+j x)}+\frac {h \left (a+b \log \left (c \left (d (e+f x)^p\right )^q\right )\right )^2 \log \left (\frac {f (g+h x)}{f g-e h}\right )}{(h i-g j)^2}+\frac {2 b f p q \left (a+b \log \left (c \left (d (e+f x)^p\right )^q\right )\right ) \log \left (\frac {f (i+j x)}{f i-e j}\right )}{(f i-e j) (h i-g j)}-\frac {h \left (a+b \log \left (c \left (d (e+f x)^p\right )^q\right )\right )^2 \log \left (\frac {f (i+j x)}{f i-e j}\right )}{(h i-g j)^2}+\frac {2 b h p q \left (a+b \log \left (c \left (d (e+f x)^p\right )^q\right )\right ) \operatorname {PolyLog}\left (2,-\frac {h (e+f x)}{f g-e h}\right )}{(h i-g j)^2}+\frac {2 b^2 f p^2 q^2 \operatorname {PolyLog}\left (2,-\frac {j (e+f x)}{f i-e j}\right )}{(f i-e j) (h i-g j)}-\frac {2 b h p q \left (a+b \log \left (c \left (d (e+f x)^p\right )^q\right )\right ) \operatorname {PolyLog}\left (2,-\frac {j (e+f x)}{f i-e j}\right )}{(h i-g j)^2}-\frac {2 b^2 h p^2 q^2 \operatorname {PolyLog}\left (3,-\frac {h (e+f x)}{f g-e h}\right )}{(h i-g j)^2}+\frac {2 b^2 h p^2 q^2 \operatorname {PolyLog}\left (3,-\frac {j (e+f x)}{f i-e j}\right )}{(h i-g j)^2} \]

output
-j*(f*x+e)*(a+b*ln(c*(d*(f*x+e)^p)^q))^2/(-e*j+f*i)/(-g*j+h*i)/(j*x+i)+h*( 
a+b*ln(c*(d*(f*x+e)^p)^q))^2*ln(f*(h*x+g)/(-e*h+f*g))/(-g*j+h*i)^2+2*b*f*p 
*q*(a+b*ln(c*(d*(f*x+e)^p)^q))*ln(f*(j*x+i)/(-e*j+f*i))/(-e*j+f*i)/(-g*j+h 
*i)-h*(a+b*ln(c*(d*(f*x+e)^p)^q))^2*ln(f*(j*x+i)/(-e*j+f*i))/(-g*j+h*i)^2+ 
2*b*h*p*q*(a+b*ln(c*(d*(f*x+e)^p)^q))*polylog(2,-h*(f*x+e)/(-e*h+f*g))/(-g 
*j+h*i)^2+2*b^2*f*p^2*q^2*polylog(2,-j*(f*x+e)/(-e*j+f*i))/(-e*j+f*i)/(-g* 
j+h*i)-2*b*h*p*q*(a+b*ln(c*(d*(f*x+e)^p)^q))*polylog(2,-j*(f*x+e)/(-e*j+f* 
i))/(-g*j+h*i)^2-2*b^2*h*p^2*q^2*polylog(3,-h*(f*x+e)/(-e*h+f*g))/(-g*j+h* 
i)^2+2*b^2*h*p^2*q^2*polylog(3,-j*(f*x+e)/(-e*j+f*i))/(-g*j+h*i)^2
 
3.6.34.2 Mathematica [A] (verified)

Time = 0.41 (sec) , antiderivative size = 654, normalized size of antiderivative = 1.41 \[ \int \frac {\left (a+b \log \left (c \left (d (e+f x)^p\right )^q\right )\right )^2}{(g+h x) (i+j x)^2} \, dx=\frac {(f i-e j) (h i-g j) \left (a-b p q \log (e+f x)+b \log \left (c \left (d (e+f x)^p\right )^q\right )\right )^2+h (f i-e j) (i+j x) \left (a-b p q \log (e+f x)+b \log \left (c \left (d (e+f x)^p\right )^q\right )\right )^2 \log (g+h x)-h (f i-e j) (i+j x) \left (a-b p q \log (e+f x)+b \log \left (c \left (d (e+f x)^p\right )^q\right )\right )^2 \log (i+j x)-2 b p q \left (a-b p q \log (e+f x)+b \log \left (c \left (d (e+f x)^p\right )^q\right )\right ) \left ((h i-g j) (j (e+f x) \log (e+f x)-f (i+j x) \log (i+j x))-h (f i-e j) (i+j x) \left (\log (e+f x) \log \left (\frac {f (g+h x)}{f g-e h}\right )+\operatorname {PolyLog}\left (2,\frac {h (e+f x)}{-f g+e h}\right )\right )+h (f i-e j) (i+j x) \left (\log (e+f x) \log \left (\frac {f (i+j x)}{f i-e j}\right )+\operatorname {PolyLog}\left (2,\frac {j (e+f x)}{-f i+e j}\right )\right )\right )-b^2 p^2 q^2 \left ((h i-g j) \left (\log (e+f x) \left (j (e+f x) \log (e+f x)-2 f (i+j x) \log \left (\frac {f (i+j x)}{f i-e j}\right )\right )-2 f (i+j x) \operatorname {PolyLog}\left (2,\frac {j (e+f x)}{-f i+e j}\right )\right )-h (f i-e j) (i+j x) \left (\log ^2(e+f x) \log \left (\frac {f (g+h x)}{f g-e h}\right )+2 \log (e+f x) \operatorname {PolyLog}\left (2,\frac {h (e+f x)}{-f g+e h}\right )-2 \operatorname {PolyLog}\left (3,\frac {h (e+f x)}{-f g+e h}\right )\right )+h (f i-e j) (i+j x) \left (\log ^2(e+f x) \log \left (\frac {f (i+j x)}{f i-e j}\right )+2 \log (e+f x) \operatorname {PolyLog}\left (2,\frac {j (e+f x)}{-f i+e j}\right )-2 \operatorname {PolyLog}\left (3,\frac {j (e+f x)}{-f i+e j}\right )\right )\right )}{(f i-e j) (h i-g j)^2 (i+j x)} \]

input
Integrate[(a + b*Log[c*(d*(e + f*x)^p)^q])^2/((g + h*x)*(i + j*x)^2),x]
 
output
((f*i - e*j)*(h*i - g*j)*(a - b*p*q*Log[e + f*x] + b*Log[c*(d*(e + f*x)^p) 
^q])^2 + h*(f*i - e*j)*(i + j*x)*(a - b*p*q*Log[e + f*x] + b*Log[c*(d*(e + 
 f*x)^p)^q])^2*Log[g + h*x] - h*(f*i - e*j)*(i + j*x)*(a - b*p*q*Log[e + f 
*x] + b*Log[c*(d*(e + f*x)^p)^q])^2*Log[i + j*x] - 2*b*p*q*(a - b*p*q*Log[ 
e + f*x] + b*Log[c*(d*(e + f*x)^p)^q])*((h*i - g*j)*(j*(e + f*x)*Log[e + f 
*x] - f*(i + j*x)*Log[i + j*x]) - h*(f*i - e*j)*(i + j*x)*(Log[e + f*x]*Lo 
g[(f*(g + h*x))/(f*g - e*h)] + PolyLog[2, (h*(e + f*x))/(-(f*g) + e*h)]) + 
 h*(f*i - e*j)*(i + j*x)*(Log[e + f*x]*Log[(f*(i + j*x))/(f*i - e*j)] + Po 
lyLog[2, (j*(e + f*x))/(-(f*i) + e*j)])) - b^2*p^2*q^2*((h*i - g*j)*(Log[e 
 + f*x]*(j*(e + f*x)*Log[e + f*x] - 2*f*(i + j*x)*Log[(f*(i + j*x))/(f*i - 
 e*j)]) - 2*f*(i + j*x)*PolyLog[2, (j*(e + f*x))/(-(f*i) + e*j)]) - h*(f*i 
 - e*j)*(i + j*x)*(Log[e + f*x]^2*Log[(f*(g + h*x))/(f*g - e*h)] + 2*Log[e 
 + f*x]*PolyLog[2, (h*(e + f*x))/(-(f*g) + e*h)] - 2*PolyLog[3, (h*(e + f* 
x))/(-(f*g) + e*h)]) + h*(f*i - e*j)*(i + j*x)*(Log[e + f*x]^2*Log[(f*(i + 
 j*x))/(f*i - e*j)] + 2*Log[e + f*x]*PolyLog[2, (j*(e + f*x))/(-(f*i) + e* 
j)] - 2*PolyLog[3, (j*(e + f*x))/(-(f*i) + e*j)])))/((f*i - e*j)*(h*i - g* 
j)^2*(i + j*x))
 
3.6.34.3 Rubi [A] (verified)

Time = 1.45 (sec) , antiderivative size = 463, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 3, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.086, Rules used = {2895, 2865, 2009}

Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.

\(\displaystyle \int \frac {\left (a+b \log \left (c \left (d (e+f x)^p\right )^q\right )\right )^2}{(g+h x) (i+j x)^2} \, dx\)

\(\Big \downarrow \) 2895

\(\displaystyle \int \frac {\left (a+b \log \left (c \left (d (e+f x)^p\right )^q\right )\right )^2}{(g+h x) (i+j x)^2}dx\)

\(\Big \downarrow \) 2865

\(\displaystyle \int \left (\frac {h^2 \left (a+b \log \left (c \left (d (e+f x)^p\right )^q\right )\right )^2}{(g+h x) (h i-g j)^2}-\frac {h j \left (a+b \log \left (c \left (d (e+f x)^p\right )^q\right )\right )^2}{(i+j x) (h i-g j)^2}-\frac {j \left (a+b \log \left (c \left (d (e+f x)^p\right )^q\right )\right )^2}{(i+j x)^2 (h i-g j)}\right )dx\)

\(\Big \downarrow \) 2009

\(\displaystyle \frac {2 b h p q \operatorname {PolyLog}\left (2,-\frac {h (e+f x)}{f g-e h}\right ) \left (a+b \log \left (c \left (d (e+f x)^p\right )^q\right )\right )}{(h i-g j)^2}-\frac {2 b h p q \operatorname {PolyLog}\left (2,-\frac {j (e+f x)}{f i-e j}\right ) \left (a+b \log \left (c \left (d (e+f x)^p\right )^q\right )\right )}{(h i-g j)^2}+\frac {2 b f p q \log \left (\frac {f (i+j x)}{f i-e j}\right ) \left (a+b \log \left (c \left (d (e+f x)^p\right )^q\right )\right )}{(f i-e j) (h i-g j)}-\frac {j (e+f x) \left (a+b \log \left (c \left (d (e+f x)^p\right )^q\right )\right )^2}{(i+j x) (f i-e j) (h i-g j)}+\frac {h \log \left (\frac {f (g+h x)}{f g-e h}\right ) \left (a+b \log \left (c \left (d (e+f x)^p\right )^q\right )\right )^2}{(h i-g j)^2}-\frac {h \log \left (\frac {f (i+j x)}{f i-e j}\right ) \left (a+b \log \left (c \left (d (e+f x)^p\right )^q\right )\right )^2}{(h i-g j)^2}+\frac {2 b^2 f p^2 q^2 \operatorname {PolyLog}\left (2,-\frac {j (e+f x)}{f i-e j}\right )}{(f i-e j) (h i-g j)}-\frac {2 b^2 h p^2 q^2 \operatorname {PolyLog}\left (3,-\frac {h (e+f x)}{f g-e h}\right )}{(h i-g j)^2}+\frac {2 b^2 h p^2 q^2 \operatorname {PolyLog}\left (3,-\frac {j (e+f x)}{f i-e j}\right )}{(h i-g j)^2}\)

input
Int[(a + b*Log[c*(d*(e + f*x)^p)^q])^2/((g + h*x)*(i + j*x)^2),x]
 
output
-((j*(e + f*x)*(a + b*Log[c*(d*(e + f*x)^p)^q])^2)/((f*i - e*j)*(h*i - g*j 
)*(i + j*x))) + (h*(a + b*Log[c*(d*(e + f*x)^p)^q])^2*Log[(f*(g + h*x))/(f 
*g - e*h)])/(h*i - g*j)^2 + (2*b*f*p*q*(a + b*Log[c*(d*(e + f*x)^p)^q])*Lo 
g[(f*(i + j*x))/(f*i - e*j)])/((f*i - e*j)*(h*i - g*j)) - (h*(a + b*Log[c* 
(d*(e + f*x)^p)^q])^2*Log[(f*(i + j*x))/(f*i - e*j)])/(h*i - g*j)^2 + (2*b 
*h*p*q*(a + b*Log[c*(d*(e + f*x)^p)^q])*PolyLog[2, -((h*(e + f*x))/(f*g - 
e*h))])/(h*i - g*j)^2 + (2*b^2*f*p^2*q^2*PolyLog[2, -((j*(e + f*x))/(f*i - 
 e*j))])/((f*i - e*j)*(h*i - g*j)) - (2*b*h*p*q*(a + b*Log[c*(d*(e + f*x)^ 
p)^q])*PolyLog[2, -((j*(e + f*x))/(f*i - e*j))])/(h*i - g*j)^2 - (2*b^2*h* 
p^2*q^2*PolyLog[3, -((h*(e + f*x))/(f*g - e*h))])/(h*i - g*j)^2 + (2*b^2*h 
*p^2*q^2*PolyLog[3, -((j*(e + f*x))/(f*i - e*j))])/(h*i - g*j)^2
 

3.6.34.3.1 Defintions of rubi rules used

rule 2009
Int[u_, x_Symbol] :> Simp[IntSum[u, x], x] /; SumQ[u]
 

rule 2865
Int[((a_.) + Log[(c_.)*((d_) + (e_.)*(x_))^(n_.)]*(b_.))^(p_.)*(RFx_), x_Sy 
mbol] :> With[{u = ExpandIntegrand[(a + b*Log[c*(d + e*x)^n])^p, RFx, x]}, 
Int[u, x] /; SumQ[u]] /; FreeQ[{a, b, c, d, e, n}, x] && RationalFunctionQ[ 
RFx, x] && IntegerQ[p]
 

rule 2895
Int[((a_.) + Log[(c_.)*((d_.)*((e_.) + (f_.)*(x_))^(m_.))^(n_)]*(b_.))^(p_. 
)*(u_.), x_Symbol] :> Subst[Int[u*(a + b*Log[c*d^n*(e + f*x)^(m*n)])^p, x], 
 c*d^n*(e + f*x)^(m*n), c*(d*(e + f*x)^m)^n] /; FreeQ[{a, b, c, d, e, f, m, 
 n, p}, x] &&  !IntegerQ[n] &&  !(EqQ[d, 1] && EqQ[m, 1]) && IntegralFreeQ[ 
IntHide[u*(a + b*Log[c*d^n*(e + f*x)^(m*n)])^p, x]]
 
3.6.34.4 Maple [F]

\[\int \frac {{\left (a +b \ln \left (c \left (d \left (f x +e \right )^{p}\right )^{q}\right )\right )}^{2}}{\left (h x +g \right ) \left (j x +i \right )^{2}}d x\]

input
int((a+b*ln(c*(d*(f*x+e)^p)^q))^2/(h*x+g)/(j*x+i)^2,x)
 
output
int((a+b*ln(c*(d*(f*x+e)^p)^q))^2/(h*x+g)/(j*x+i)^2,x)
 
3.6.34.5 Fricas [F]

\[ \int \frac {\left (a+b \log \left (c \left (d (e+f x)^p\right )^q\right )\right )^2}{(g+h x) (i+j x)^2} \, dx=\int { \frac {{\left (b \log \left (\left ({\left (f x + e\right )}^{p} d\right )^{q} c\right ) + a\right )}^{2}}{{\left (h x + g\right )} {\left (j x + i\right )}^{2}} \,d x } \]

input
integrate((a+b*log(c*(d*(f*x+e)^p)^q))^2/(h*x+g)/(j*x+i)^2,x, algorithm="f 
ricas")
 
output
integral((b^2*log(((f*x + e)^p*d)^q*c)^2 + 2*a*b*log(((f*x + e)^p*d)^q*c) 
+ a^2)/(h*j^2*x^3 + g*i^2 + (2*h*i*j + g*j^2)*x^2 + (h*i^2 + 2*g*i*j)*x), 
x)
 
3.6.34.6 Sympy [F]

\[ \int \frac {\left (a+b \log \left (c \left (d (e+f x)^p\right )^q\right )\right )^2}{(g+h x) (i+j x)^2} \, dx=\int \frac {\left (a + b \log {\left (c \left (d \left (e + f x\right )^{p}\right )^{q} \right )}\right )^{2}}{\left (g + h x\right ) \left (i + j x\right )^{2}}\, dx \]

input
integrate((a+b*ln(c*(d*(f*x+e)**p)**q))**2/(h*x+g)/(j*x+i)**2,x)
 
output
Integral((a + b*log(c*(d*(e + f*x)**p)**q))**2/((g + h*x)*(i + j*x)**2), x 
)
 
3.6.34.7 Maxima [F]

\[ \int \frac {\left (a+b \log \left (c \left (d (e+f x)^p\right )^q\right )\right )^2}{(g+h x) (i+j x)^2} \, dx=\int { \frac {{\left (b \log \left (\left ({\left (f x + e\right )}^{p} d\right )^{q} c\right ) + a\right )}^{2}}{{\left (h x + g\right )} {\left (j x + i\right )}^{2}} \,d x } \]

input
integrate((a+b*log(c*(d*(f*x+e)^p)^q))^2/(h*x+g)/(j*x+i)^2,x, algorithm="m 
axima")
 
output
a^2*(h*log(h*x + g)/(h^2*i^2 - 2*g*h*i*j + g^2*j^2) - h*log(j*x + i)/(h^2* 
i^2 - 2*g*h*i*j + g^2*j^2) + 1/(h*i^2 - g*i*j + (h*i*j - g*j^2)*x)) + inte 
grate((b^2*log(((f*x + e)^p)^q)^2 + 2*(q*log(d) + log(c))*a*b + (q^2*log(d 
)^2 + 2*q*log(c)*log(d) + log(c)^2)*b^2 + 2*((q*log(d) + log(c))*b^2 + a*b 
)*log(((f*x + e)^p)^q))/(h*j^2*x^3 + g*i^2 + (2*h*i*j + g*j^2)*x^2 + (h*i^ 
2 + 2*g*i*j)*x), x)
 
3.6.34.8 Giac [F]

\[ \int \frac {\left (a+b \log \left (c \left (d (e+f x)^p\right )^q\right )\right )^2}{(g+h x) (i+j x)^2} \, dx=\int { \frac {{\left (b \log \left (\left ({\left (f x + e\right )}^{p} d\right )^{q} c\right ) + a\right )}^{2}}{{\left (h x + g\right )} {\left (j x + i\right )}^{2}} \,d x } \]

input
integrate((a+b*log(c*(d*(f*x+e)^p)^q))^2/(h*x+g)/(j*x+i)^2,x, algorithm="g 
iac")
 
output
integrate((b*log(((f*x + e)^p*d)^q*c) + a)^2/((h*x + g)*(j*x + i)^2), x)
 
3.6.34.9 Mupad [F(-1)]

Timed out. \[ \int \frac {\left (a+b \log \left (c \left (d (e+f x)^p\right )^q\right )\right )^2}{(g+h x) (i+j x)^2} \, dx=\int \frac {{\left (a+b\,\ln \left (c\,{\left (d\,{\left (e+f\,x\right )}^p\right )}^q\right )\right )}^2}{\left (g+h\,x\right )\,{\left (i+j\,x\right )}^2} \,d x \]

input
int((a + b*log(c*(d*(e + f*x)^p)^q))^2/((g + h*x)*(i + j*x)^2),x)
 
output
int((a + b*log(c*(d*(e + f*x)^p)^q))^2/((g + h*x)*(i + j*x)^2), x)